package com.xuecheng.api.content;

import com.xuecheng.api.content.model.dto.CourseBaseDTO;
import com.xuecheng.api.content.model.qo.QueryCourseModel;
import com.xuecheng.api.content.model.token.TokenResult;
import com.xuecheng.api.content.model.vo.CourseBaseVO;
import com.xuecheng.common.domain.page.PageRequestParams;
import com.xuecheng.common.domain.page.PageVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author 黄子弟
 * @Date 2021/12/7
 */

@Api(value = "课程基本信息管理" ,tags = "课程基本信息Api接口")
public interface CourseBaseControllerApi {

    @ApiOperation("查询所有课程信息")
    PageVO queryCourseBaseList();

    @ApiOperation("课程分页条件查询")
    @ApiImplicitParams(value = {@ApiImplicitParam(name = "params",value = "分页数据信息",required = false,dataType = "PageRequestParams",paramType = "query"),
            @ApiImplicitParam(name = "model",value = "查询条件信息",required = true,dataType = "QueryCourseModel",paramType = "body")
    })
    PageVO queryCourseList(PageRequestParams params,@RequestBody QueryCourseModel model);

    @ApiOperation("添加录播课程的基本信息")
    @ApiImplicitParam(name = "courseBaseVO",value = "课程基本信息",required = true,dataType = "CourseBaseVO",paramType = "body")
    CourseBaseDTO createCourseBase(@RequestBody CourseBaseVO courseBaseVO);

    @ApiOperation("根据Id查询课程基本信息")
    @ApiImplicitParam(name = "courseBaseId",value = "课程id",required = true,dataType = "Long",paramType = "path")
    CourseBaseDTO getCourseById(@PathVariable Long courseBaseId);

    @ApiOperation("修改课程信息")
    @ApiImplicitParam(name = "courseBaseVO",value = "课程基本信息",required = true,dataType = "CourseBaseVO",paramType = "body")
    CourseBaseDTO modifyCourseBase(CourseBaseVO courseBaseVO);

    @ApiOperation("根据课程id删除课程信息")
    @ApiImplicitParam(name = "courseBaseId",value = "课程id",required = true,dataType = "Long",paramType = "path")
    void removeCourseBase(Long courseBaseId);

    @ApiOperation("获得上传凭证")
    TokenResult getUpLoadToken();


    @ApiOperation("课程提交审核")
    @ApiImplicitParam(name = "courseBaseId",value = "课程id",required = true,dataType = "Long",paramType = "path")
    void commitCourseBase(Long courseBaseId);
}
